local path="C:\bl_rep"
local anlist="5F"
local tcut="0(50)100"

local gamlist "1 1.1 1.2 1.5 2 2.5 3 `c(maxfloat)'"
local dellist "1 1.1 1.2 1.5 2 2.5 3 `c(maxfloat)'"


foreach an in `anlist'{
 clear
 set obs 1
 local n=1
 gen an=""
 gen tcut=.
 gen del=.
 gen gam=.
 gen tobs=.
 gen pval=.
 save "`path'\A`an'sares", replace
 forvalues t=`tcut'{
  foreach del in `dellist'{
   foreach gam in `gamlist'{
    use "`path'\MRA`an'ct2sd`t'tmn.dta"
    if `del' < 1000{
     arsimsens resp, t(treat) s(strat) g(`gam') d(`del')
	} 
	if `del'> 1000{ //ie if = infty
	 arsens resp, tr(treat) str(strat) g(`gam') d(`del')
	} 
	local pval=r(pval)
	local tobs=r(tsobs)
	use "`path'\A`an'sares", clear 	
	replace an="`an'" in `n'
	replace tcut=`t' in `n'
	replace tobs=`tobs' in `n'
	replace gam=`gam' in `n'
	replace del=`del' in `n'
	replace pval=`pval' in `n'
	local n=`n'+1 
	set obs `n'
	save "`path'\A`an'sares", replace
   }	
  }
 } 
}
